package com.buddy.design.pattern._04delegate.simple;

import java.util.HashMap;
import java.util.Map;

public class Leader {

    /*
     *  需要预先知道员工的特长、特征，并分发任务
     */

    public Map<String,Employee> register = new HashMap<>();

    public Leader(){
        register.put("加密",new EmployeeA());
        register.put("架构",new EmployeeB());
    }
    public void doing(String command){
        register.get(command).doing(command);
    }
}
